<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML>
<html>
<head>
  <title> 后台管理系统</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link href="/resources/css/dpl-min.css" rel="stylesheet" type="text/css" />
  <link href="/resources/css/bui-min.css" rel="stylesheet" type="text/css" />
  <link href="/resources/css/page-min.css" rel="stylesheet" type="text/css" />
  <style type="text/css">
    code {
      padding: 0px 4px;
      color: #d14;
      background-color: #f7f7f9;
      border: 1px solid #e1e1e8;
    }
  </style>
</head>
<body>

<div class="container">
    <div class="detail-page">
      <h2>申请信息</h2>
      <div class="detail-section">
        <div class="row detail-row">
          <div class="span8">
            <label>编号：</label><span class="detail-text">${data.memberId}</span>
          </div>
          <div class="span8">
            <label>姓名：</label><span class="detail-text">${data.memberName}</span>
          </div>

          </div>

        </div>
        <div class="row detail-row">
          <div class="span8">
            <label>提现金额：</label><span class="detail-text">${data.amount}</span>
          </div>
          <div class="span8">
            <label>当前状态：</label><span class="detail-text">
              <c:if test="${data.status eq '0'}">待审核</c:if>
              <c:if test="${data.status eq '1'}">审核通过</c:if>
              <c:if test="${data.status eq '2'}">审核拒绝</c:if>
          </span>

        <input type="hidden" id="id" name="id" value="${data.id}"/>
        </div>
        </div>

      <div class="row detail-row">
        <div class="span8">
          <label>提现类型：</label><span class="detail-text">
          <c:if test="${data.type eq '1'}">微信提现</c:if>
          <c:if test="${data.type eq '2'}">银行卡提现</c:if>
        </span>
        </div>
        <div class="span12">
          <label>备注：</label><span class="detail-text">${data.remark}</span>
        </div>
      </div>


      <div class="row detail-row">
        <div class="span8">
          <label>申请时间：</label><span class="detail-text">${data.timeStr}</span>
        </div>
        <div class="span12">
          <label>备注：</label><span class="detail-text">${data.remark}</span>
        </div>
      </div>

    </div>


      <div class="detail-section">
        <h3>账号信息</h3>
      <div class="row detail-row">
        <div class="span8">
          <label>开户银行：</label><span class="detail-text">${data.bankName}</span>
        </div>
        <div class="span8">
          <label>持卡人姓名：</label><span class="detail-text">${data.cardName}</span>
        </div>
        <div class="span8">
          <label>卡号：</label><span class="detail-text">${data.cardNo}</span>
        </div>
      </div>
    </div>
    </div>
  </div>

    <div class="row form-actions actions-bar">
      <div class="span13 offset3 ">
        <c:if test="${data.status eq '0'}">
          <button type="button" class="button" onclick="verify('1')">审核通过</button>
          <button type="button" class="button" onclick="verify('2')">审核拒绝</button>
        </c:if>
       <button type="button" class="button" onclick="back()">返回</button>
      </div>
    </div>

</div>
<script type="text/javascript" src="/resources/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="/resources/js/sea.js"></script>
<script type="text/javascript" src="/resources/js/bui-min.js"></script>
<script type="text/javascript" src="/resources/js/config-min.js"></script>


<script type="text/javascript">
  BUI.use('common/page'); //页面链接跳转
  BUI.use(['bui/tree','bui/form'],function (Tree,Form) {

  });

  function back(){
      top.topManager.openPage({
        id: 'bous_summary',
        isClose: true
      });
    top.topManager.reloadPage('bous_summary');
  }
  function verify(status){
    var msg = "确定审核通过该申请吗？";
    if(status=='2')
      msg = "确定拒绝该申请吗？";
    if(confirm(msg)){
      $.ajax({
        url:"/tx/verify?r="+Math.random(),
        type:"post",
        data:{
          id:$("#id").val(),
          status:status
        },
        success:function(res){
          alert(res.msg);
          if(res.success)
            back();
        },
        error: function () {

        }
      });
    }
  }
</script>

</body>
</html> 